package com.xj.community.util;

import com.xj.community.entity.User;

public class MyThreadLocal {
    private static ThreadLocal<User> threadLocal = new ThreadLocal<>();

    public static void setUser(User user){
        threadLocal.set(user);
    }

    public static User getUser(){
        return threadLocal.get();
    }

    public static void remove(){
        threadLocal.remove();
    }
}
